home *** CD-ROM | disk | FTP | other *** search
- Path: engnews1.Eng.Sun.COM!taumet!clamage
- From: tjb839@zacatecas.optimum.com (Tim Boemker)
- Newsgroups: comp.std.c++
- Subject: possible extension -- typeof(expr)
- Date: 6 Mar 1996 18:13:40 GMT
- Organization: ?
- Approved: clamage@eng.sun.com (comp.std.c++)
- Message-ID: <199603061757.AA17403@zacatecas.optimum.com>
- NNTP-Posting-Host: taumet.eng.sun.com
- Content-Type: text
- X-Authenticated: tjb839 on POP host zacatecas.optimum.com
- X-Mailed-From: InterNews 1.0.6@boemker.optimum.com
- Content-Length: 431
- X-Lines: 15
- Originator: clamage@taumet
-
- Many times in working with STL I've wished for a new operator to return
- the type of an expression, much the same way sizeof returns the size of
- an expression.
-
- It would allow programs like the following, for example:
-
- set<foo, less<foo> > s;
- for(typeof(s)::iterator i = s.begin(); i != s.end(); i++)
- // do something
-
- I suppose this must have been considered by now. Has anything come of
- it?
-
- Tim Boemker
- Optimum Group
-
-
- [ comp.std.c++ is moderated. To submit articles: Try just posting with your
- newsreader. If that fails, use mailto:std-c++@ncar.ucar.edu
- comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
- Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
- Comments? mailto:std-c++-request@ncar.ucar.edu
- ]
-